/**
 * @Author: ZFEason
 * @Date: 2023-07-18 15:43:50
 * @LastEditors: ZFEason
 * @LastEditTime: 2023-07-20 14:13:20
 * @FilePath: /ift-economy-network-h5/src/service/storage-situation/index.ts
 * @Description: 
 */
import { get, post } from '@/utils/request'
const VITE_API_URL = import.meta.env.VITE_API_URL

const GOVECONOMICS = `${VITE_API_URL}ft-economic-api`

/**
* 入库情况-挖掘项目时间列表
* @param params
* @returns
*/
export const getProjectTime = (params = {}) =>
  get(`${GOVECONOMICS}/projectInvestment/getExcavateProjectTime`, params, {
    showLoading: true,
  })

/**
* 入库情况-挖掘项目列表查询
* @param params
* @returns
*/
export const getStorageList = (data = {}) =>
  post(`${GOVECONOMICS}/projectInvestment/getExcavateProjects`, data, {
    showLoading: true,
  })

/**
* 新增挖掘项目-获取街道列表
* @param params
* @returns
*/
export const getStreetList = (params = {}) =>
  get(`${GOVECONOMICS}/projectInvestment/getStreets`, params, {
    showLoading: true,
  })


/**
* 新增挖掘项目-获取牵头单位列表
* @param params
* @returns
*/
export const getLeaderUnitList = (params = {}) =>
  get(`${GOVECONOMICS}/dept/queryOrgUserList`, params, {
    showLoading: true,
  })

/**
* 新增挖掘项目
* @param params
* @returns
*/
export const addExcavateProject = (data = {}) =>
  post(`${GOVECONOMICS}/projectInvestment/addExcavateProject`, data, {
    showLoading: true,
  })

/**
* 挖掘项目详情查询
* @param params
* @returns
*/
export const getExcavateProjectInfo = (params = { id: '' }) =>
  post(`${GOVECONOMICS}/projectInvestment/getExcavateProjectInfo/${params?.id ?? ''}`, params, {
    showLoading: true,
  })

/**
 *文件上传
 */
export function fileUpload(params: any, config: any) {
  return post('gov-file-upload/single-upload', params, {
    ...config,
    headers: {
      'i-log-endPoint': 'docking',
      'i-token': '3e27fee5f7cb4047bea16defa53c6f69'
    }
  })
}
